package com.zp.io;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;

public class FileReaderTest {
	public static void main(String[] args) throws IOException {
		/**
		 * 从文件中读取数据，打印结果与数据格式完全一致；
		 */
		FileReader fr = new FileReader("D:/lisi/java.java");
		BufferedReader br = new BufferedReader(fr);
		
		String str = br.readLine();
		while(null != str){
			System.out.println(str);
			str = br.readLine();
		}
		br.close();
	}
}
